package com.resource.project.os;

import com.resource.project.entity.system.Hr;
import lombok.NonNull;

public class AskToken {
    @NonNull
    private String idToken;
    @NonNull
    private Long expiresIn;

    public Hr getHr() {
        return hr;
    }

    public void setHr(Hr hr) {
        this.hr = hr;
    }

    private Hr hr;

    @NonNull
    public String getIdToken() {
        return this.idToken;
    }

    @NonNull
    public Long getExpiresIn() {
        return this.expiresIn;
    }

    public void setIdToken(@NonNull final String idToken) {
        if (idToken == null) {
            throw new NullPointerException("idToken is marked non-null but is null");
        } else {
            this.idToken = idToken;
        }
    }

    public void setExpiresIn(@NonNull final Long expiresIn) {
        if (expiresIn == null) {
            throw new NullPointerException("expiresIn is marked non-null but is null");
        } else {
            this.expiresIn = expiresIn;
        }
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof AskToken)) {
            return false;
        } else {
            AskToken other = (AskToken)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$idToken = this.getIdToken();
                Object other$idToken = other.getIdToken();
                if (this$idToken == null) {
                    if (other$idToken != null) {
                        return false;
                    }
                } else if (!this$idToken.equals(other$idToken)) {
                    return false;
                }

                Object this$expiresIn = this.getExpiresIn();
                Object other$expiresIn = other.getExpiresIn();
                if (this$expiresIn == null) {
                    if (other$expiresIn != null) {
                        return false;
                    }
                } else if (!this$expiresIn.equals(other$expiresIn)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof AskToken;
    }

    public String toString() {
        return "AskToken(idToken=" + this.getIdToken() + ", expiresIn=" + this.getExpiresIn() + ")";
    }

    public AskToken(@NonNull final String idToken, @NonNull final Long expiresIn) {
        if (idToken == null) {
            throw new NullPointerException("idToken is marked non-null but is null");
        } else if (expiresIn == null) {
            throw new NullPointerException("expiresIn is marked non-null but is null");
        } else {
            this.idToken = idToken;
            this.expiresIn = expiresIn;
        }
    }
}
